﻿using System;
using System.Management;
using System.ComponentModel;
using System.Runtime.InteropServices;

//Returns Date, hour, minute, second.
namespace Sensors
{
    class TimeSensor
    {
        public override string ToString()
        {
            return "Date : " + DateTime.Now.Date + "\nHours : " + DateTime.Now.TimeOfDay.Hours + "\nMinutes : "
                + DateTime.Now.TimeOfDay.Minutes + "\nSeconds : " + DateTime.Now.TimeOfDay.Seconds;
        }
        public void time()
        {
            string date = DateTime.Now.Date.ToString();
            Console.WriteLine("Date: {0}",date);

            string hours = DateTime.Now.Date.ToString();
            Console.WriteLine("Hours: {0}",hours);

            string minutes = DateTime.Now.TimeOfDay.Minutes.ToString();
            Console.WriteLine("Minutes: {0}", minutes);

            string seconds = DateTime.Now.TimeOfDay.Seconds.ToString();
            Console.WriteLine("Seconds: {0}", seconds);

        }
    }
}
